<!DOCTYPE html>
<html lang="zh_CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../static/bootstrap-4.3.1-dist/css/bootstrap.css">
    <link rel="stylesheet" href="../static/css/head.css">
    <link rel="stylesheet" href="../static/css/login.css">
    <script src="../static/js/head.js"></script>
    <title>登录</title>
</head>

<body>
    <header  class="my-header">
        <div class="header-container">
            <div class="logo">
                <h1>基于Python爬虫的股票分析预测系统</h1>
                <p>cyz</p>
            </div>
            <nav class="nav-links">
                <ul>
                    <li><a href="{{ url_for('index') }}">主页</a></li>
                    <li><a href="{{ url_for('history') }}">历史数据</a></li>
                    <li><a href="{{ url_for('main') }}">可视化大屏</a></li>
                </ul>
            </nav>
            
        </div>
        <div class="user-info">
            <ul>
                {% if session['username'] %}
                    <li><a href="#">{{ session['username'] }}</a></li>
                    <li><a href="{{ url_for('logout') }}">注销</a></li>
                {% else %}
                    <li><a href="{{ url_for('login') }}">登录</a></li>
                    <li><a href="{{ url_for('register') }}">注册</a></li>
                {% endif %}
                <li><div id="current-time"></div></li>
            </ul>
        </div>
    </header>
    {% block content %}
    <h2>登录</h2>
    {% if error %}
    <div class="alert alert-danger" style="text-align: center;color: red;font-size: 18px;">{{ error }}</div>
    {% endif %}
    <form method="post">
        <div class="form-group">
            <label for="username">用户名</label>
            <input type="text" class="form-control" id="username" name="username" required>
        </div>
        <div class="form-group">
            <label for="password">密码</label>
            <input type="password" class="form-control" id="password" name="password" required>
        </div>
        <button type="submit" class="btn btn-primary">登录</button>
    </form>
    {% endblock %}
</body>

</html>